package com.mohunhun.config;

import io.swagger.v3.oas.models.ExternalDocumentation;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SpringDocConfig {
    @Bean
    public OpenAPI myOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("论坛系统API")
                        .description("论坛系统前后端分离API测试")
                        .version("v1.0.0")
                        .license(new License()
                                .name("许可协议")
                                .url("https://gitee.com/mohunhun"))
                        .contact(new Contact()
                                .name("mohunhun")
                                .email("3168192322@qq.com")))
                .externalDocs(new ExternalDocumentation()
                        .description("博客")
                        .url("https://blog.csdn.net/douyawen?spm=1000.2115.3001.5343"));
    }
}